import { request } from '@/api/service'
export const crudOptions = (vm) => {
  return {
    pageOptions: {
      compact: true
    },
    options: {
      height: '100%',
      highlightCurrentRow: false
    },
    rowHandle: {
      width: 180,
      edit: {
        show: true
      },
      remove: {
        show: false
      }
    },
    viewOptions: {
      componentType: 'row'
    },
    formOptions: {
      defaultSpan: 12 // 默认的表单 span
    },
    columns: [
      {
        title: '型号',
        component: { props: { color: 'auto' } },
        key: 'type',
        search: {}// 启用查询
        // form: {
        //   disabled: true
        // }
      },

      {
        title: '流量',
        component: { props: { color: 'auto' } },
        search: {}, // 启用查询
        key: 'flow'
        // form: {
        //   disabled: true
        // }
      },
      {
        title: '扬程',
        component: { props: { color: 'auto' } },
        search: {}, // 启用查询
        key: 'height'
        // form: {
        //   disabled: true
        // }
      },

      {
        title: '功率',
        component: { props: { color: 'auto' } },
        search: {}, // 启用查询
        key: 'power'
        // form: {
        //   disabled: true
        // }
      },
      {
        title: '转速',
        component: { props: { color: 'auto' } },
        key: 'rev',
        search: {}// 启用查询
        // form: {
        //   disabled: true
        // }
      },
      {
        title: '口径',
        component: { props: { color: 'auto' } },
        search: {}, // 启用查询
        key: 'calibre'
        // form: {
        //   disabled: true
        // }
      },

      {
        title: '安装图1',
        component: { props: { color: 'auto' } },
        key: 'url1'
        // form: {
        //   disabled: true
        // }
      },
      {
        title: '安装图2',
        component: { props: { color: 'auto' } },
        key: 'url2'
        // form: {
        //   disabled: true
        // }
      },
      {
        title: '性能图1',
        component: { props: { color: 'auto' } },
        key: 'url3'
        // form: {
        //   disabled: true
        // }
      },
      {
        title: '性能图2',
        component: { props: { color: 'auto' } },
        key: 'url4'
        // form: {
        //   disabled: true
        // }
      },
      {

        title: '描述',
        component: { props: { color: 'auto' } },
        key: 'description',
        width: 160,
        showOverflowTooltip: true

      }

    ]
  }
}
